﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DomainModel.Entities.Album>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Create</h2>

<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>

<% using (Html.BeginForm("Create", "Album", FormMethod.Post, new { enctype = "multipart/form-data" })) { %>

    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Album</legend>     
        <%= Html.Hidden("referringurl") %>
         <%: Html.HiddenFor(model => model.PictureID) %>
         <%: Html.HiddenFor(model => model.ArtistID) %>
         <%: Html.HiddenFor(model => model.LastUpdate) %>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.AlbumName) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.AlbumName) %>
            <%: Html.ValidationMessageFor(model => model.AlbumName) %>
        </div>        

        <div class="editor-label">
            <%: Html.LabelFor(model => model.AlbumReleaseYear) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.AlbumReleaseYear) %>
            <%: Html.ValidationMessageFor(model => model.AlbumReleaseYear) %>
        </div>
         <% Html.RenderPartial("UcPicture"); %>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
<% } %>

<div>
<a href="<%: ViewData["referringUrl"].ToString() %>">Back to List</a> 
</div>

</asp:Content>

